<!-- BEGIN PAGE HEADER-->
<h3 class="page-title">
    用户列表
    <small></small>
</h3>
<div class="page-bar">
    <ul class="page-breadcrumb">
        <li>
            <i class="fa fa-home"></i>
            <a href="index.html">Home</a>
            <i class="fa fa-angle-right"></i>
        </li>
        <li>
            <a href="#">用户管理</a>
            <i class="fa fa-angle-right"></i>
        </li>
        <li>
            <a href="#">用户列表</a>
        </li>
    </ul>
</div>
<!-- END PAGE HEADER-->
<!-- BEGIN SAMPLE PORTLET CONFIGURATION MODAL FORM-->
<div class="modal fade" id="portlet-config" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                <h4 class="modal-title">消息提示</h4>
            </div>
            <div class="modal-body" style="text-align:center; font-size: 16px">
                取消/屏蔽此用户?
            </div>
            <div class="modal-footer">
                <button type="button" class="btn blue table-group-action-del" data-dismiss="modal">确定</button>
                <button type="button" class="btn default" data-dismiss="modal">取消</button>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>
<!-- /.modal -->
<!-- END SAMPLE PORTLET CONFIGURATION MODAL FORM-->
<!-- BEGIN PAGE CONTENT-->
<div class="row">
    <div class="col-md-12">
        <!-- BEGIN EXAMPLE TABLE PORTLET-->
        <div class="portlet box grey-cascade">
            <div class="portlet-title">
                <div class="caption">
                    <i class="fa fa-globe"></i>用户列表
                </div>
                <div class="tools">
                    <a href="javascript:;" class="collapse">
                    </a>
                    <a href="javascript:;" class="reload">
                    </a>
                    <a href="javascript:;" class="remove">
                    </a>
                </div>
            </div>
            <div class="portlet-body">
                <div class="table-toolbar">
                    <!--有添加数据的时候使用-->
                    <!--div class="col-md-6">
                        <div class="btn-group">
                            <button id="sample_editable_1_new" class="btn green" onclick="window.location.href='/admin/member/add'">
                                Add New <i class="fa fa-plus"></i>
                            </button>
                        </div>
                    </div-->
                    <div class="row">
                        <form role="search" action="#">
                            <div class="col-md-2 col-sm-12">
                                <select class="form-control" name="class">
                                    <option value="">搜索类型</option>
                                    <option value="1">ID</option>
                                    <option value="2">昵称</option>
                                    <option value="3">手机</option>
                                </select>
                            </div>
                            <div class="col-md-2 col-sm-12">
                                <input type="text" class="form-control" name="keyword" placeholder="请输入查找内容" value="">
                            </div>
                            <div class="col-md-8 col-sm-12">
                                <div class="table-group-actions pull-right">
                                    <select class="table-group-action-input form-control input-inline input-small input-sm" name="gender">
                                        <option value="">请选择性别...</option>
                                        <option value="1">男</option>
                                        <option value="2">女</option>
                                    </select>
                                    <button class="btn btn-sm yellow submit">
                                        <i class="fa fa-search"></i>
                                        搜索
                                    </button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
                <table class="table table-striped table-bordered table-hover" id="sample_1">
                    <thead>
                    <tr>
                        <th class="table-checkbox">
                            <input type="checkbox" class="group-checkable" data-set="#sample_1 .checkboxes"/>
                        </th>
                        <th>
                            搞起ID
                        </th>
                        <th>
                            手机号码
                        </th>
                        <th>
                            昵称
                        </th>
                        <th>
                            是否认证
                        </th>
                        <th>
                            性别
                        </th>
                        <th>
                            擅长游戏
                        </th>
                        <th>
                            账户余额
                        </th>
                        <th>
                            注册时间
                        </th>
                        <th>
                            详情
                        </th>
                        <th>
                            操作
                        </th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php foreach($lists as $value) { ?>
                        <tr class="odd gradeX">
                            <td>
                                <input type="checkbox" class="checkboxes" value="<?php echo $value['id']; ?>"/>
                            </td>
                            <td>
                                <?php echo $value['id']; ?>
                            </td>
                            <td>
                                <?php echo $value['mobile']; ?>
                            </td>
                            <td>
                                <?php echo $value['nick_name']; ?>
                            </td>
                            <td>
                                <?php if($value['authentication'] == 1) {echo '是';} else {echo '否';} ?>
                            </td>
                            <td>
                                <?php if($value['gender'] == 1) {
                                    echo '男';
                                } elseif($value['gender'] == 2) {
                                    echo '女';
                                } ?>
                            </td>
                            <td>
                                <?php echo $value['main_game']; ?>
                            </td>
                            <td>
                                未
                            </td>
                            <td class="center">
                                <?php if($value['regist_time']>0){ echo date('Y-m-d H:i:s', $value['regist_time']);}?>
                            </td>
                            <td>
                                <a class="btn btn-sm btn-success" href="/admin/member/edit?id=<?php echo $value['id']; ?>" title="点击查看">
                                    详情
                                </a>
                            </td>
                            <td>
                                <?php if($value['status'] == 1) { ?>
                                    <a href="#portlet-config" class="btn btn-xs red delData" data-toggle="modal"
                                       value="/admin/member/del?id=<?php echo $value['id'].'&status='.$value['status'];?>">禁止</a>
                                <?php } elseif($value['status'] == 2) { ?>
                                    <a href="#portlet-config" class="btn btn-xs red delData" data-toggle="modal"
                                       value="/admin/member/del?id=<?php echo $value['id'].'&status='.$value['status'];?>">取消禁止</a>
                                <?php } ?>
                            </td>
                        </tr>
                    <?php } ?>
                    </tbody>
                </table>
                <?php
                $data = [
                    'count'   => $this->count,
                    'page'    => $this->page,
                    'perPage' => $this->perPage,
                ];
                echo $this->render('../../../views/layouts/pager.phtml', $data);
                ?>
            </div>
        </div>
        <!-- END EXAMPLE TABLE PORTLET-->
    </div>
</div>
<!-- END PAGE CONTENT-->